<style>
    #im_<{$widgets_id}>{ z-index:65535; position:absolute;<{$setting.alignselect|default:'left'}>:0 ;}
</style>
<div id="im_<{$widgets_id}>" class="im">
    <div id="im_main_<{$widgets_id}>" class="im-main">
        <div class="infobox">
            <{$setting.titleexp}>
        </div>
            <ul class="im-list">
                <{foreach from=$data item=data key=key}>
                <li class="im-item">
                <{if $data.type==1}>
                <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<{$data.link}>&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:<{$data.link}>:41 &r=0.8641202345024794" alt="<{$data.info}>" title="<{$data.info}>"></a>
                <{elseif $data.type==2}>
                <a href="msnim:chat?contact=<{$data.link}>"><img width="30" height="30" border="0" src="images/msn.png" title="<{$data.info}>"/></a>
                <{elseif $data.type==3}>
                <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=<{$data.link|escape:'url'}>&site=cntaobao&s=1&charset=utf-8"><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid=<{$data.link|escape:'url'}>&site=cntaobao&s=1&charset=utf-8" title="<{$data.info}>"/></a>
                <{elseif $data.type==4}>
                <a target="_blank" href="http://scs1.sh1.china.alibaba.com/msg.atc?v=1&uid=<{$data.link}>"><img border="0" src="images/ali.gif" title="<{$data.info}>"/></a>
                <{elseif $data.type==5}>
                <a href="callto://<{$data.link}>"><img border="0" src="images/skype.gif" title="<{$data.info}>"/></a>
                <{elseif $data.type==6}>
                <img  style="CURSOR: pointer" onclick="javascript:window.open('http://b.qq.com/webc.htm?new=0&sid=<{$data.link}>&eid=&o=&q=7&ref='+document.location, '_blank', 'height=544, width=644,toolbar=no,scrollbars=no,menubar=no,status=no');"  border="0" SRC="images/qq.png"><br /><{$data.info}>
                <{elseif $data.type==7}>
                <script charset="utf-8" type="text/javascript" src="http://wpa.b.qq.com/cgi/wpa.php?key=<{$data.link}>"></script>

                <{/if}>
                </li>
                <{/foreach}>
            </ul>
    </div>
    <div id="im_bar_<{$widgets_id}>" class="im-bar"></div>
</div>

<script>
    (function(){
        var im = $('im_<{$widgets_id}>');
        var imMain = $('im_main_<{$widgets_id}>');
        var timer;
        im.addEvents({
            'mouseenter':function(){
                clearTimeout(timer);
                imMain.setStyle('display','block');
            },
            'mouseleave':function(){
                timer = function(){imMain.setStyle('display','none');}.delay(1000);
            }
        });
        setImTop();
        function setImTop(){
            im.tween('top',$(document.body).getScroll().y+100);
        }

        window.addEvent('scroll',function(){
            setImTop();
        })
    })();
</script>
